/*
 * LiveResult.java - Copyright May 5, 2012 Z Networks Group, Inc. All rights reserved.
 * Z Networks Group PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.andromeda.skadi.entity.query;

import com.andromeda.lang.event.Event;
import com.andromeda.lang.event.EventDelegate;
import com.andromeda.lang.event.EventListener;
import com.andromeda.lang.event.EventSource;
import com.andromeda.skadi.entity.Entity;
import com.andromeda.skadi.property.Property;
import java.util.List;

/**
 *
 * @author Dickinson Roman Arismendy Torres
 */
public class LiveResult implements EventSource<LiveResultEvent> {

    private Property<Integer> resultCount;
    private /*
             * Unmodifiable-Observable
             */ List<Entity> result;
    private EventDelegate<LiveResultEvent> evtDelegate = new EventDelegate<LiveResultEvent>();

    @Override
    public void addEventListener(EventListener<LiveResultEvent> listener) {
        evtDelegate.addEventListener(listener);
    }

    @Override
    public void removeEventListener(EventListener<LiveResultEvent> listener) {
        evtDelegate.removeEventListener(listener);
    }

    @Override
    public void addEventListener(EventListener<LiveResultEvent> listener, boolean strongReferenced) {
        evtDelegate.addEventListener(listener, strongReferenced);
    }
}
